extends Node2D
const ANIMATIONS = preload("res://animations/animations.tscn")

func enemy_hurt(pos:Vector2):
	spawn_ani(pos,"enemy_hurt")
	pass
	
func enemy_die(pos:Vector2):
	spawn_ani(pos,"enemy_die")
	pass

func spawn_ani(pos:Vector2,ani:String):
	var animations = ANIMATIONS.instantiate()
	animations.global_position = pos
	get_tree().root.add_child(animations)
	animations.play(ani)

# Called when the node enters the scene tree for the first time.
func _ready():
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
	pass
